//----------------------------------------------------------------------------------------------
//	Filename:	Object.cpp
//	Author:		Keith Bugeja
//	Date:		27/02/2010
//----------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
#include "Object.h"

using namespace PCS::Core;

int Object::m_cuid = 0;
//----------------------------------------------------------------------------------------------
Object::~Object() { }
//----------------------------------------------------------------------------------------------
Object::Object()
{
	Object::Initialise();
	m_strName = boost::str(boost::format("OID:%1%") % m_uid); 
}
//----------------------------------------------------------------------------------------------
Object::Object(std::string p_strObjectName)
{
	Object::Initialise();
	m_strName = p_strObjectName;
}
//----------------------------------------------------------------------------------------------
size_t Object::GetHashCode(void) const 
{ 
	boost::hash<std::string> hash;  
	return hash(m_strName);
}
//----------------------------------------------------------------------------------------------
std::string Object::ToString(void) const 
{
	return boost::str(boost::format("Name : %s, ID : %d") 
		% m_strName % m_uid);
}
//----------------------------------------------------------------------------------------------
int Object::GetNextUid(void) const {
	return ++m_cuid;
}
